package com.example.xm.service.impl;

import com.example.xm.entity.Geci;
import com.example.xm.mapper.GeciMapper;
import com.example.xm.service.IGeciService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;

@Service
public class GeciServiceImpl implements IGeciService {
    @Autowired
    private GeciMapper geciMapper;

    @Override
    public List<Geci> selectList(Geci geci) {
        return geciMapper.selectList(geci);
    }

    @Override
    public Object add(List<Geci> geci) {
        geciMapper.deleteByPrimaryKey(geci.get(0).getVid());
        for (Geci geci1 : geci) {
            geciMapper.insert(geci1);
        }
        return null;
    }
}
